﻿Public Class EstadoCierreObraSocialDAO

    Public Shared ESTADO_CERRADO As Integer = 1
    Public Shared ESTADO_COBRADO As Integer = 2
    Public Shared ESTADO_PAGADO As Integer = 3

    Public Shared Function comboFiltroEstadoCierreObraSocial() As DataTable
        Dim cn As SqlClient.SqlConnection = Nothing
        Try
            cn = Conexion.Conectar
            Dim ds As New DataSet
            Dim da As New SqlClient.SqlDataAdapter("usp_estadoCierreObraSocial_comboFiltro", cn)
            With da.SelectCommand
                .CommandType = CommandType.StoredProcedure
            End With
            da.Fill(ds, "CierresObrasSociales")

            Return ds.Tables("CierresObrasSociales")
        Catch ex As Exception
            'GUARDAMOS EL ERROR EN LA BD
            ErrorDAO.insertarError(ex)
            Return Nothing
        Finally
            Conexion.Desconectar(cn) 'PASAR POR PARAMETRO LA CONEXION
        End Try
    End Function

End Class
